import Vue from 'vue'
import Router from 'vue-router'
import Hello from '@/components/Hello'
import Home from '@/components/Home'

//登录  
import UserEntry from '@/components/userLogin/UserEntry'
import UserRegister from '@/components/userLogin/UserRegister'
import ForgetPassword from '@/components/userLogin/ForgetPassword'
import RevisePassword from '@/components/userLogin/RevisePassword'
import UserEntryDialog from '@/components/userLogin/UserEntryDialog'

//账号设置
import Index from '@/components/setInfo/Index'
import CompanyInformationEdit from '@/components/setInfo/CompanyInformationEdit'
import PersonInformationEdit from '@/components/setInfo/PersonInformationEdit'
import SetPassword from '@/components/setInfo/SetPassword'
import CompanyInfor from '@/components/setInfo/CompanyInfor'
import PersonalInfoCard from '@/components/setInfo/PersonalInfoCard'

//首页
import homePageSys from '@/components/homePage/homePageSys'
import InterviewList from '@/components/homePage/InterviewList'

//公司查询
import SearchCompany from '@/components/company/SearchCompany'
import CompanyInfo from '@/components/company/CompanyInfo'
//人才查询
import SearchTalent from '@/components/recruitment/SearchTalent'
import TalentDetail from '@/components/recruitment/TalentDetail'
import TalentInfo from '@/components/recruitment/TalentInfo'
//职位查询
import SearchPosition from '@/components/position/SearchPosition'
import PositionInfo from '@/components/position/PositionInfo'

//我的简历
import MyResume from '@/components/myResume/MyResume'
import PersonResume from '@/components/myResume/PersonResume'
//投递箱
import DeliverHistory from '@/components/deliverBox/DeliverHistory'
//收件箱
import PersonInBox from '@/components/personInBox/PersonInBox'

//企业发布
import CompanyJobPublish from '@/components/companyPublish/CompanyJobPublish'
import CompanyJobPublishDetial from '@/components/companyPublish/CompanyJobPublishDetial'

//企业发件箱(邀请函) 
import CompanySendBox from '@/components/companySendbox/CompanySendBox'
import CompanySendDetail from '@/components/companySendbox/CompanySendDetail'
//(邀请函)
import CompanyInvitationList from '@/components/companySendbox/CompanyInvitationList'
//（面试通知）
import CompanyInterviewList from '@/components/companySendbox/CompanyInterviewList'
//现场招聘
import Hiring from '@/components/fieldRecruiting/Hiring'
import OnlineBooking from '@/components/fieldRecruiting/OnlineBooking'
import MyBooth from '@/components/fieldRecruiting/MyBooth'
import AttendingHistory from '@/components/fieldRecruiting/AttendingHistory'
import PublishRecruitment from '@/components/fieldRecruiting/PublishRecruitment'
import CompanyInfoRotation from '@/components/fieldRecruiting/CompanyInfoRotation'
//企业收件箱
import CompanyInboxList from '@/components/companyInbox/CompanyInboxList'
import CompanyInboxDetail from '@/components/companyInbox/CompanyInboxDetail'

//缴费明细
import NoPayList from '@/components/paymentDetails/NoPayList'
//订单支付
import OrderPayments from '@/components/paymentDetails/OrderPayments'
//管理员后台管理 
import DashIndex from '@/components/administrationCenter/DashIndex'

//套餐管理
import PackageListDetail from '@/components/packageManagement/PackageListDetail'
import PackageOrderDetail from '@/components/packageManagement/PackageOrderDetail'
import PackagePurchaseList from '@/components/packageManagement/PackagePurchaseList'
import PackageOrderListNoPay from '@/components/packageManagement/PackageOrderListNoPay'
import PackageOrderListCompletePay from '@/components/packageManagement/PackageOrderListCompletePay'
import PackageUserDetial from '@/components/packageManagement/PackageUserDetial'

import NoPaidBooth from '@/components/fieldRecruiting/NoPaidBooth'
import PaidBooth from '@/components/fieldRecruiting/PaidBooth'

Vue.use(Router)

import { getAdministrationRouter } from './administrationCenter.js'

var indexRouter = []
indexRouter = getAdministrationRouter()
export default new Router({
  routes: [{
    path: '/',
    name: 'Home',
    component: Home,
    redirect: '/homepagesys',
    children: [
      {
        path: 'user',
        name: 'PackageUserDetial',
        component: PackageUserDetial,
      }, {
        path: 'homepagesys',
        name: 'homePageSys',
        component: homePageSys
      }, {
        path: 'interviewlist',
        name: 'InterviewList',
        component: InterviewList
      }, {
        path: 'company',
        name: 'SearchCompany',
        component: SearchCompany
      }, {
        path: 'companyinfo/:id',
        name: 'CompanyInfo',
        component: CompanyInfo
      }, {
        path: 'companyinforotation/:id',
        name: 'CompanyInfoRotation',
        component: CompanyInfoRotation
      }, {
        path: 'recruitment',
        name: 'SearchTalent',
        component: SearchTalent
      }, {
        path: 'talentdetail/:id',
        name: 'TalentDetail',
        component: TalentDetail
      }, {
        path: 'position',
        name: 'SearchPosition',
        component: SearchPosition
      }, {
        path: 'positioninfo/:id',
        name: 'PositionInfo',
        component: PositionInfo
      }, {
        path: 'companypublish',
        name: 'CompanyJobPublish',
        component: CompanyJobPublish
      }, {
        path: 'companypublishdetial/:id',
        name: 'CompanyJobPublishDetial',
        component: CompanyJobPublishDetial
      }, {
        path: 'companyrecive',
        name: 'CompanySendBox',
        component: CompanySendBox,
        children: [{
          path: 'companyinvitation',//邀请函组件
          name: 'CompanyInvitationList',
          component: CompanyInvitationList
        }, {
          path: 'companyinterview',//面试通知组件
          name: 'CompanyInterviewList',
          component: CompanyInterviewList
        }]
      }, {
        path: 'companysenddetail/:resume_id',
        name: 'CompanySendDetail',
        component: CompanySendDetail
      }, {
        path: 'companyinbox',
        name: 'CompanyInboxList',
        component: CompanyInboxList
      }, {
        path: 'companyinboxdetail/:id/:resume_id',
        name: 'CompanyInboxDetail',
        component: CompanyInboxDetail
      }, {
        path: 'myresume/:id',
        name: 'MyResume',
        component: MyResume
      }, {
        path: 'deliverhistory',
        name: 'DeliverHistory',
        component: DeliverHistory
      }, {
        path: 'personinbox/:type',
        name: 'PersonInBox',
        component: PersonInBox
      }, {
        path: 'packagelistdetail',
        name: 'PackageListDetail',
        component: PackageListDetail
      }, {
        path: 'packageorderdetail',
        name: 'PackageOrderDetail',
        component: PackageOrderDetail
      }, {
        path: 'orderpayments',
        name: 'OrderPayments',
        component: OrderPayments
      }, {
        path: 'index',
        name: 'Index',
        component: Index,
        children: [{
          path: 'companyinfo/:type',
          name: 'CompanyInformationEdit',
          component: CompanyInformationEdit
        }, {
          path: 'personinfo/:type',
          name: 'PersonInformationEdit',
          component: PersonInformationEdit
        }, {
          path: 'setpassword',
          name: 'SetPassword',
          component: SetPassword
        }, {
          path: 'packagepurchaselist',
          name: 'PackagePurchaseList',
          component: PackagePurchaseList
        }, {
          path: 'packageorderlistnopay',
          name: 'PackageOrderListNoPay',
          component: PackageOrderListNoPay
        }, {
          path: 'packageorderlistcompletepay',
          name: 'PackageOrderListCompletePay',
          component: PackageOrderListCompletePay
        }, {
          path: 'nopaylist',
          name: 'NoPayList',
          component: NoPayList
        }, {
          path: 'companydata',
          name: 'CompanyInfor',
          component: CompanyInfor
        }, {
          path: 'persondata',
          name: 'PersonalInfoCard',
          component: PersonalInfoCard
        }, {
          path: 'nopaidbooth',
          name: 'NoPaidBooth',
          component: NoPaidBooth
        }, {
          path: 'paidbooth',
          name: 'PaidBooth',
          component: PaidBooth
        }]
      }, {
        path: 'hiring',
        name: 'Hiring',
        component: Hiring,
        children: [{
          path: 'attendinghistory',
          name: 'AttendingHistory',
          component: AttendingHistory
        }, {
          path: 'mybooth',
          name: 'MyBooth',
          component: MyBooth
        }, {
          path: 'onlinebooking',
          name: 'OnlineBooking',
          component: OnlineBooking
        }]
      }]
  }, {
    path: '/userentry',
    name: 'UserEntry',
    component: UserEntry,
  }, {
    path: '/userregister',
    name: 'UserRegister',
    component: UserRegister
  }, {
    path: '/ForgetPassword',
    name: 'ForgetPassword',
    component: ForgetPassword
  }, {
    path: '/RevisePassword',
    name: 'RevisePassword',
    component: RevisePassword
  }, {
    path: '/userentrydialog',
    name: 'UserEntryDialog',
    component: UserEntryDialog
  }, {
    path: '/dashIndex',
    name: 'DashIndex',
    component: DashIndex,
    children: indexRouter
  }, {
    path: '/test',
    name: 'PublishRecruitment',
    component: PublishRecruitment
  }]
})
